home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Newton Sample Code 1.2 / Routing / AutoRoute-1 / AutoRoute.text < prev    next >
Encoding:
Text File  |  1994-07-08  |  20.3 KB  |  749 lines  |  [TEXT/MPS ]

  1. // Copyright 1994 Apple Computer, Inc. All rights reserved.
  2. // by J. Christopher Bell, Newton DTS
  3.  
  4. DefConst ('kAppSymbol,        '|AutoRoute:PIEDTS|);
  5. DefConst ('kPrintFormat,      '|borderFormat:AutoRoute:PIEDTS|);
  6. DefConst ('kOtherPrintFormat, '|otherPrintFormat:AutoRoute:PIEDTS|);
  7.  
  8.  
  9. // run at application install time
  10. // setup stuff the app may need before it is ever opened
  11. InstallScript := func(partFrame)
  12. begin
  13.    local myApp := partFrame.theForm ;
  14.  
  15.    // put my routing frame in the global routing frame
  16.    routing.(kAppSymbol) := myApp.myRoutingFrame ;
  17.  
  18.    // put my format in the root so it can be found
  19.    GetRoot().(kPrintFormat) := BuildContext(myApp.myPrintFormat);
  20.    // put my other format in the root so it can be found
  21.    GetRoot().(kOtherPrintFormat) := BuildContext(myApp.otherPrintFormat);
  22. end;
  23.  
  24.  
  25. // run when application and/or card with app removed
  26. // cleanup routing stuff
  27. RemoveScript := func(packageFrame)
  28. begin
  29.    // get rid of entry in global routing frame
  30.    RemoveSlot(routing, kAppSymbol);
  31.  
  32.    // remove my print format
  33.    RemoveSlot(GetRoot(), kPrintFormat);
  34.  
  35.    // remove my print format
  36.    RemoveSlot(GetRoot(), kOtherPrintFormat);
  37. end;
  38.  
  39.  
  40. // ---- End Project Data ----
  41.  
  42. // ---- Beginning of Print templates ----
  43.  
  44. // ---- File myPrintFormat ----
  45.  
  46. // Before Script for "printFormat_myPrintFormat"
  47. // Copyright 1994 Apple Computer, Inc. All rights reserved.
  48.  
  49. printFormat_myPrintFormat :=
  50.    {
  51.     printNextPageScript:
  52.       func()
  53.       begin
  54.           // only print one page
  55.           // returning nil means there are no other pages
  56.           nil;
  57.       end,
  58.     _proto: protoPrintFormat,
  59.     debug: "printFormat_myPrintFormat"
  60.    };
  61.  
  62. _view000 := /* child of printFormat_myPrintFormat */
  63.    {viewFlags: 33,
  64.     viewFormat: 593,
  65.     viewBounds: {left: 0, top: 0, right: 0, bottom: 0},
  66.     viewSetupFormScript:
  67.       func()
  68.       begin
  69.          self.viewBounds := :Parent():LocalBox() ;
  70.          self.viewBounds.left := self.viewBounds.left + 2 ;
  71.          self.viewBounds.right := self.viewBounds.right - 2 ;
  72.          self.viewBounds.top := self.viewBounds.top + 2 ;
  73.          self.viewBounds.bottom := self.viewBounds.bottom - 2 ;
  74.       end,
  75.     viewclass: 74
  76.    };
  77.  
  78. _view001 := /* child of _view000 */
  79.    {text: "AutoRoute!......Custom text sent from a Newton far far away...",
  80.     viewBounds: {top: 30, left: 2, right: -2, bottom: 50},
  81.     viewJustify: 50,
  82.     _proto: protoStaticText
  83.    };
  84.  
  85.  
  86.  
  87. _view002 := /* child of _view000 */
  88.    {text: "Static Text",
  89.     viewBounds: {top: 300, left: 2, right: -2, bottom: 350},
  90.     viewSetupFormScript:
  91.       func()
  92.       begin
  93.           // Change our appearance based on the routing data
  94.           SetValue(self, 'text, fields.body.text);
  95.       end,
  96.     viewJustify: 50,
  97.     viewFormat: 336,
  98.     _proto: protoStaticText
  99.    };
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106. // ---- File otherPrintFormat ----
  107.  
  108. // Before Script for "printFormat_otherPrintFormat"
  109. // Copyright 1994 Apple Computer, Inc. All rights reserved.
  110.  
  111. printFormat_otherPrintFormat :=
  112.    {
  113.     printNextPageScript:
  114.       func()
  115.       begin
  116.           // only print one page
  117.           nil;
  118.       end,
  119.     _proto: protoPrintFormat,
  120.     debug: "printFormat_otherPrintFormat"
  121.    };
  122.  
  123. _view003 := /* child of printFormat_otherPrintFormat */
  124.    {viewFlags: 33,
  125.     viewFormat: 593,
  126.     viewBounds: {left: 0, top: 0, right: 0, bottom: 0},
  127.     viewSetupFormScript:
  128.       func()
  129.       begin
  130.          self.viewBounds := :Parent():LocalBox() ;
  131.          self.viewBounds.left := self.viewBounds.left + 2 ;
  132.          self.viewBounds.right := self.viewBounds.right - 2 ;
  133.          self.viewBounds.top := self.viewBounds.top + 2 ;
  134.          self.viewBounds.bottom := self.viewBounds.bottom - 2 ;
  135.       end,
  136.     viewclass: 74
  137.    };
  138.  
  139. _view004 := /* child of _view003 */
  140.    {
  141.     text:
  142.       "This was done using the other printformat!\nAutoRoute!......Custom text sent from a Newton far far away..."
  143.     ,
  144.     viewBounds: {top: 30, left: 2, right: -2, bottom: 50},
  145.     viewJustify: 50,
  146.     _proto: protoStaticText
  147.    };
  148.  
  149.  
  150.  
  151. _view005 := /* child of _view003 */
  152.    {text: "Static Text",
  153.     viewBounds: {top: 300, left: 2, right: -2, bottom: 350},
  154.     viewSetupFormScript:
  155.       func()
  156.       begin
  157.           // Change our appearance based on the routing data
  158.           SetValue(self, 'text, fields.body.text);
  159.       end,
  160.     viewJustify: 50,
  161.     viewFormat: 336,
  162.     _proto: protoStaticText
  163.    };
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. // ---- End of Print templates ----
  171.  
  172. // ---- File AutoRoute.t ----
  173.  
  174. // Before Script for "myapp"
  175. // Copyright 1994 Apple Computer, Inc. All rights reserved.
  176.  
  177. myapp :=
  178.    {
  179.     PutAway:
  180.       func(item)
  181.       begin
  182.           // This is the place where you could get wild and move the information
  183.           // into soups, other apps, and otherwise extract the information.
  184.       
  185.           // Note that when you use the auto-email function to send mail, you
  186.           // must have "self" have a slot called appSymbol so that the mail function
  187.           // can insert your appsymbol in the outbox item. When the Newton receives
  188.           // an item which it wants to 'put away', it uses that symbol to actually
  189.           // know which application to send the item.
  190.       
  191.          print("Received the following item:");
  192.           print(item);
  193.       
  194.           if not GetView(self) then
  195.               self:Open();
  196.       
  197.           SetValue(para, 'text, item.body.text);
  198.       end,
  199.     myCustomText: nil,
  200.     myRoutingFrame:
  201.       {
  202.          // very simple routing frame, just doing printing
  203.          // and faxing
  204.       
  205.          // here is the printing stuff, simple yes?
  206.          print: {
  207.             title: "Print Thing",
  208.             routeForm: 'printSlip,
  209.             formats: [kPrintFormat, kOtherPrintFormat]},
  210.       
  211.          // and here is the fax stuff
  212.          fax: {
  213.             title: "Fax",
  214.             routeForm: 'faxSlip,
  215.             formats: [kPrintFormat, kOtherPrintFormat]},
  216.       
  217.          mail: {
  218.             title: "Mail",
  219.             routeForm: 'mailSlip,
  220.             formats: [kPrintFormat, kOtherPrintFormat]},
  221.       
  222.          zap: {
  223.             title: "Beam",
  224.             routeForm: 'zapSlip},
  225.           },
  226.     viewFormat: 83951953,
  227.     target: "UNUSED TARGET!",
  228.     hideIOBox: nil,
  229.     AutoFax:
  230.       func(sendNow, hideIOBox)
  231.       begin
  232.           local myItem, subject;
  233.           
  234.           // Do our private setup of 'fields' information. This includes
  235.           // the phone number to use and the data to send.
  236.           :SetupMyData();
  237.           
  238.           subject := EnsureInternal("AutoRoute  AutoFax: ") && DateNTime(time());
  239.           
  240.           myItem := {connect: sendNow, hidden: hideIOBox, appSymbol: appSymbol, 
  241.                        phonenumber: myCustomFrame.toPhone, tophone: "Number to display",
  242.                        title: subject, body: myCustomFrame.myData,
  243.                        name: myCustomFrame.name, printerformat: currentPrintFormat};
  244.           
  245.           
  246.           call kSendFunc with ('fax, myItem);
  247.       end,
  248.     myTextScript:
  249.       func(fields, target)
  250.       begin
  251.          // fields.data ;        // returns the text that will be put into a mail message
  252.       
  253.           EnsureInternal("This is my text returned by the TextScript!");
  254.       end,
  255.     viewBounds: {left: -1, top: 3, right: 233, bottom: 326},
  256.     otherPrintFormat:
  257.       {
  258.              // The print format for this application. 
  259.               // An application can have more than one format if it wants.
  260.       
  261.              // title that shows up in the Format picker
  262.              // in the print or fax slip
  263.          title: "Other Format",
  264.       
  265.              // this could be a symbol for an auxilliary
  266.              // information slip. See the auxForm sample code
  267.          auxForm: nil,
  268.           
  269.                 // symbol for a script that is called by
  270.              // mail for a text only message to send
  271.          textScript: 'myTextScript,
  272.       
  273.              // true if the user can attach a real frame to the mail
  274.          attachment: true,
  275.       
  276.              // The proto must be set to this for all printing and faxing behavior
  277.               // Note that the actual "cover page" for faxes is controlled by a slot
  278.               // within the routing 'fields' frame.
  279.          _proto: ROM_coverPageFormat,
  280.       
  281.              // the main format used for each page of a print or fax output.
  282.               // Note that printFormat_myPrintFormat is what NTK will call our
  283.               // printFormat which has the name myPrintFormat.
  284.          mainFormat: printFormat_otherPrintFormat,
  285.       },
  286.     SetTemporaryPrinterChoice:
  287.       func(theChoice)
  288.       begin
  289.           currentPrinterSetting := theChoice;
  290.       end,
  291.     myPrintFormat:
  292.       {
  293.              // The print format for this application. 
  294.               // An application can ave more than one format if it wants.
  295.       
  296.              // title that shows up in the Format picker
  297.              // in the print or fax slip
  298.          title: "AutoRoute Format",
  299.       
  300.              // this could be a symbol for an auxilliary
  301.              // information slip. See the auxForm sample code
  302.          auxForm: nil,
  303.           
  304.                 // symbol for a script that is called by
  305.              // mail for a text only message to send
  306.          textScript: 'myTextScript,
  307.       
  308.              // true if the user can attach a real frame to the mail
  309.          attachment: true,
  310.       
  311.              // The proto must be set to this for all printing and faxing behavior
  312.               // Note that the actual "cover page" for faxes is controlled by a slot
  313.               // within the routing 'fields' frame.
  314.          _proto: ROM_coverPageFormat,
  315.       
  316.              // the main format used for each page of a print or fax output.
  317.               // Note that printFormat_myPrintFormat is what NTK will call our
  318.               // printFormat which has the name myPrintFormat.
  319.          mainFormat: printFormat_myPrintFormat,
  320.       },
  321.     _proto: protoApp,
  322.     myCustomFrame: nil,
  323.     appSymbol: kAppSymbol,
  324.     title: "AutoRoute",
  325.     AutoBeam:
  326.       func(sendNow, hideIOBox)
  327.       begin
  328.           local myItem, subject;
  329.           
  330.           subject := EnsureInternal("AutoRoute  AutoBeam: ") && DateNTime(time());
  331.           
  332.           // Do our private setup of 'fields' information. This includes
  333.           // the phone number to use and the data to send.
  334.           :SetupMyData();
  335.           
  336.           myItem := {connect: sendNow, hidden: hideIOBox, body: myCustomFrame.myData,
  337.                        appSymbol: appSymbol, title: subject };
  338.           
  339.           
  340.           call kSendFunc with ('beam, myItem);
  341.       end,
  342.     SetupMyData:
  343.       func()
  344.       begin
  345.           constant kMyVersionNum := 1;
  346.           
  347.           myCustomText := para.text;
  348.           
  349.           // since a paragraphView could have 'nil' as its text slot...
  350.           if not myCustomText then myCustomText := "<empty text>";
  351.           
  352.           local faxNum := getroot():MungePhone(userconfiguration.faxPhone, userconfiguration.country);
  353.           
  354.           
  355.           
  356.           // usually, most of these slots will represent the OTHER person's information but we fill
  357.           // these slots with your own information so that you probably do not have to change any code
  358.           // to fax or email using this sample. 
  359.           myCustomFrame := TotalClone({toPhone: faxNum, 
  360.                                   email: userconfiguration.mailAccount, name: "Destination Name/Company",
  361.                                   myData: {text: myCustomText, timeStamp: time(), myAppVersion: kMyVersionNum} });
  362.       end,
  363.     currentPrinterSetting: nil,
  364.     viewSetupFormScript:
  365.       func()
  366.       begin
  367.           local b := GetAppParams();
  368.           constant kMaxWidth := 240;
  369.           constant kMaxHeight := 336;
  370.           
  371.           viewBounds := RelBounds(b.appAreaLeft, b.appAreaTop,
  372.                   Min(b.appAreaWidth, kMaxWidth),
  373.                   Min(b.appAreaHeight, kMaxHeight) );
  374.           
  375.           
  376.           currentPrinterSetting := call kGetUserConfigFunc with ('currentPrinter);
  377.           currentPrintFormat := kPrintFormat ;
  378.       end,
  379.     AutoPrint:
  380.       func(sendNow, hideIOBox)
  381.       begin
  382.           local myItem, subject;
  383.           
  384.           :SetupMyData();
  385.           
  386.           subject := EnsureInternal("AutoRoute  AutoPrint: ") && DateNTime(time());
  387.           
  388.           myItem := {connect: sendNow, hidden: hideIOBox, appSymbol: appSymbol,
  389.                      body: myCustomFrame.myData, title: subject, 
  390.                      printerformat: currentPrintFormat, printer: currentPrinterSetting};
  391.           
  392.           
  393.           call kSendFunc with ('print, myItem); 
  394.       end,
  395.     currentPrintFormat: nil,
  396.     debug: "myapp",
  397.     AutoEmail:
  398.       func(sendNow, hideIOBox)
  399.       begin
  400.           local  subject, myItem;
  401.           
  402.           // Do our setup of our custom data for our application
  403.           :SetupMyData();
  404.           
  405.           subject := EnsureInternal("AutoEmail: " & DateNTime(time()));
  406.           
  407.           myItem := {connect: sendNow, hidden: hideIOBox, email: myCustomFrame.email, 
  408.                        title: subject, text: myCustomFrame.myData.text, 
  409.                        appSymbol: appSymbol, body: myCustomFrame.myData};
  410.           
  411.           
  412.           call kSendFunc with ('mail, myItem);
  413.       end,
  414.     GetTemporaryPrinterChoice:
  415.       func()
  416.       begin
  417.           currentPrinterSetting;
  418.       end,
  419.     sendNow: nil
  420.    };
  421.  
  422. fax := /* child of myapp */
  423.    {text: "Auto-Fax",
  424.     buttonClickScript:
  425.       func()
  426.       begin
  427.           :AutoFax(sendNow, hideIOBox);
  428.       end,
  429.     viewBounds: {left: 0, top: 78, right: 150, bottom: 98},
  430.     viewJustify: 8388630,
  431.     _proto: protoTextButton,
  432.     debug: "fax"
  433.    };
  434.  
  435.  
  436.  
  437. print := /* child of myapp */
  438.    {text: "Auto-Print",
  439.     buttonClickScript:
  440.       func()
  441.       begin
  442.           :AutoPrint(sendNow, hideIOBox);
  443.       end,
  444.     viewBounds: {left: 0, top: 108, right: 150, bottom: 128},
  445.     viewJustify: 8388630,
  446.     _proto: protoTextButton,
  447.     debug: "print"
  448.    };
  449.  
  450.  
  451.  
  452. email := /* child of myapp */
  453.    {text: "Auto-Email",
  454.     buttonClickScript:
  455.       func()
  456.       begin
  457.           :AutoEmail(sendNow, hideIOBox);
  458.       end,
  459.     viewBounds: {left: 0, top: 138, right: 150, bottom: 158},
  460.     viewJustify: 8388630,
  461.     _proto: protoTextButton,
  462.     debug: "email"
  463.    };
  464.  
  465.  
  466.  
  467. beam := /* child of myapp */
  468.    {text: "Auto-Beam",
  469.     buttonClickScript:
  470.       func()
  471.       begin
  472.           :AutoBeam(sendNow, hideIOBox);
  473.       end,
  474.     viewBounds: {left: 0, top: 168, right: 150, bottom: 188},
  475.     viewJustify: 8388630,
  476.     _proto: protoTextButton,
  477.     debug: "beam"
  478.    };
  479.  
  480.  
  481.  
  482. para := /* child of myapp */
  483.    {viewFlags: 7681,
  484.     viewFormat: 12625,
  485.     viewlinespacing: 20,
  486.     viewFont: 18434,
  487.     viewBounds: {left: 14, top: 15, right: -6, bottom: 70},
  488.     viewJustify: 48,
  489.     viewclass: 81,
  490.     debug: "para"
  491.    };
  492. // View para is declared to myapp
  493.  
  494.  
  495.  
  496. send now? := /* child of myapp */
  497.    {text: "Send/connect now",
  498.     viewBounds: {left: -32, top: 195, right: 69, bottom: 214},
  499.     valueChanged:
  500.       func()
  501.       begin
  502.           sendNow := viewValue;
  503.       end,
  504.     buttonValue: true,
  505.     viewJustify: 8388628,
  506.     viewValue: true,
  507.     viewSetupDoneScript:
  508.       func()
  509.       begin
  510.           :valueChanged();
  511.           inherited:?viewSetupDoneScript();
  512.       end,
  513.     _proto: protoCheckbox,
  514.     debug: "send now?"
  515.    };
  516.  
  517.  
  518.  
  519. hide iobox? := /* child of myapp */
  520.    {text: "Hide outbox",
  521.     viewBounds: {left: -32, top: 214, right: 69, bottom: 232},
  522.     valueChanged:
  523.       func()
  524.       begin
  525.           hideIOBox := viewValue;
  526.       end,
  527.     buttonValue: true,
  528.     viewJustify: 8388628,
  529.     viewValue: nil,
  530.     viewSetupDoneScript:
  531.       func()
  532.       begin
  533.           :valueChanged();
  534.           inherited:?viewSetupDoneScript();
  535.       end,
  536.     _proto: protoCheckbox,
  537.     debug: "hide iobox?"
  538.    };
  539.  
  540.  
  541.  
  542. _view006 := /* child of myapp */
  543.    {text: " ",
  544.     viewBounds: {left: 139, top: 197, right: 207, bottom: 213},
  545.     viewJustify: 8388610,
  546.     possibleStrings: ["(i/o is busy)", "(idle)"],
  547.     viewIdleScript:
  548.       func()
  549.       begin
  550.       
  551.           local index := (if iobusy then 0 else 1);      // check the global iobusy variable
  552.           
  553.           SetValue(self, 'text, possibleStrings[index]);
  554.           
  555.           // This should return the number of milliseconds to delay. NIL if no more idling.
  556.           1000;   // Check only once a second. 
  557.           // If you check too often, you will run down the battery
  558.       end,
  559.     viewSetupDoneScript:
  560.       func()
  561.       begin
  562.       :SetupIdle(1);   // after only 1 millisecond, start display
  563.       end,
  564.     _proto: protoStaticText
  565.    };
  566.  
  567.  
  568.  
  569. toPrinter := /* child of myapp */
  570.    {text: " ",
  571.     viewBounds: {left: 87, top: 250, right: 234, bottom: 270},
  572.     viewSetupDoneScript:
  573.       func()
  574.       begin
  575.           :SetupIdle(1);   // after only 1 millisecond, start display
  576.       end,
  577.     viewJustify: 8388610,
  578.     viewIdleScript:
  579.       func()
  580.       begin
  581.           local name := call kGetPrinterNameFunc with (currentPrinterSetting);
  582.           
  583.           SetValue(self, 'text, name);
  584.           
  585.           // This should return the number of milliseconds to delay. NIL if no more idling.
  586.           1000;   // Check only once a second. 
  587.           // If you check too often, you will run down the battery
  588.       end,
  589.     _proto: protoStaticText,
  590.     debug: "toPrinter"
  591.    };
  592. // View toPrinter is declared to myapp
  593.  
  594.  
  595.  
  596. currentPrinter := /* child of myapp */
  597.    {text: " ",
  598.     viewBounds: {left: 19, top: 291, right: 225, bottom: 307},
  599.     viewSetupDoneScript:
  600.       func()
  601.       begin
  602.           :SetupIdle(1);   // after only 1 millisecond, start display
  603.       end,
  604.     viewJustify: 8388610,
  605.     viewIdleScript:
  606.       func()
  607.       begin
  608.       
  609.           local printerFrame :=  call kGetUserConfigFunc with ('currentPrinter);
  610.           local name := call kGetPrinterNameFunc with (printerFrame);
  611.           
  612.           SetValue(self, 'text, "(default:" & name & ")");
  613.           
  614.           // This should return the number of milliseconds to delay. NIL if no more idling.
  615.           1000;   // Check only once a second. 
  616.           // If you check too often, you will run down the battery
  617.       end,
  618.     _proto: protoStaticText,
  619.     debug: "currentPrinter"
  620.    };
  621. // View currentPrinter is declared to myapp
  622.  
  623.  
  624.  
  625. _view007 := /* child of myapp */
  626.    {text: "ChangePrinter",
  627.     buttonClickScript:
  628.       func()
  629.       begin
  630.           printchooser:Open();
  631.       end,
  632.     viewBounds: {top: 252, left: 2, right: 82, bottom: 269},
  633.     _proto: protoTextButton
  634.    };
  635.  
  636.  
  637.  
  638. // ---- File myChooser ----
  639.  
  640. // Before Script for "printchooser"
  641. // Copyright 1994 Apple Computer, Inc. All rights reserved.
  642.  
  643. printchooser := /* child of myapp */
  644.    {viewFlags: 512,
  645.     viewBounds: {left: 10, top: -27, right: -10, bottom: 39},
  646.     viewJustify: 112,
  647.     declareSelf: 'base,
  648.     viewFormat: 50398705,
  649.     viewclass: 74,
  650.     debug: "printchooser"
  651.    };
  652. // View printchooser is declared to myapp
  653.  
  654. _view008 := /* child of printchooser */ {_proto: protoClosebox};
  655.  
  656.  
  657.  
  658. _view009 := /* child of printchooser */
  659.    {viewBounds: {left: 8, top: 14, right: 208, bottom: 46},
  660.     viewSetupFormScript:
  661.       func()
  662.       begin
  663.           local toDisplay;
  664.       
  665.           //breakloop();
  666.           if GetTemporaryPrinterChoice exists then
  667.          begin
  668.              // if usedCustomChoice is true, this chooser will
  669.              // not permanently change userconfiguration.currentPrinter
  670.              usedCustomChoice := true;
  671.              originalPrinter := call kGetUserConfigFunc with ('currentPrinter);
  672.           
  673.              toDisplay := :GetTemporaryPrinterChoice();
  674.              call kSetUserConfigFunc with ('currentPrinter, toDisplay);
  675.          end;
  676.           else
  677.              usedCustomChoice := nil;
  678.              
  679.           inherited:?viewSetupFormScript();
  680.       end,
  681.     usedCustomChoice: nil,
  682.     viewQuitScript:
  683.       func()
  684.       begin
  685.           local theChoice;
  686.           
  687.           if usedCustomChoice then
  688.          begin
  689.               // assume we need to let someone know what choice was made
  690.           
  691.              theChoice := call kGetUserConfigFunc with ('currentPrinter);
  692.              :SetTemporaryPrinterChoice(theChoice);
  693.           
  694.               // restore the current printer to the original choice
  695.              call kSetUserConfigFunc with ('currentPrinter, originalPrinter);
  696.          end;
  697.           
  698.            // make sure any changes to the user configuration are saved!
  699.           call kFlushUserConfigFunc with ();
  700.           
  701.           inherited:?viewQuitScript();
  702.       end,
  703.     originalPrinter: nil,
  704.     _proto: protoLabelPicker
  705.    };
  706.  
  707. // After Script for "_view009"
  708. thisView := _view009;
  709. // Turn this into a real printer chooser button from the ROM
  710. thisView._proto := ROM_printerchooserbutton ;
  711.  
  712.  
  713.  
  714.  
  715. // ---- Back in File AutoRoute.t ----
  716.  
  717. alternate format := /* child of myapp */
  718.    {text: "Use Other Print Format",
  719.     viewBounds: {left: -20, top: 232, right: 106, bottom: 250},
  720.     valueChanged:
  721.       func()
  722.       begin
  723.           if viewValue then
  724.               currentPrintFormat := kOtherPrintFormat ;
  725.           else
  726.               currentPrintFormat := kPrintFormat ;
  727.       end,
  728.     buttonValue: true,
  729.     viewJustify: 8388628,
  730.     viewValue: nil,
  731.     viewSetupDoneScript:
  732.       func()
  733.       begin
  734.           :valueChanged();
  735.           inherited:?viewSetupDoneScript();
  736.       end,
  737.     _proto: protoCheckbox,
  738.     debug: "alternate format"
  739.    };
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747. // ---- Beginning of section for non used Layout files ----
  748.  
  749. // End of output